package com.airnewslinkosky.ticket.ui.flight;

import android.content.Intent;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

import com.airnewslinkosky.ticket.R;
import com.airnewslinkosky.ticket.ui.BaseActivity;
import com.airnewslinkosky.ticket.ui.PersonCenter;
import com.airnewslinkosky.ticket.ui.personcenter.PersonContactorList;
import com.mobclick.android.MobclickAgent;

public class AnimInsuranceDetail  extends BaseActivity  implements OnClickListener{

	private TextView insurance1,insurance2;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.fly_anim_insurance_detail);
		// 删除窗口背景
        getWindow().setBackgroundDrawable(null);
		activityList.add(this);
		
		insurance1=(TextView)findViewById(R.id.insurance1);
		insurance1.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);//下划线
		insurance1.setTextColor(Color.BLUE);
		insurance1.setOnClickListener(this);

		insurance2=(TextView)findViewById(R.id.insurance2);
		insurance2.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);//下划线
		insurance2.setTextColor(Color.BLUE);
		insurance2.setOnClickListener(this);
		
		findViewById(R.id.backBut).setOnClickListener(this);
	}
	
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
			case R.id.backBut: 
				Intent intentR = new Intent();
				intentR.setClass(AnimInsuranceDetail.this, FlyOrderInput.class);
				startActivity(intentR);
				break;
			case R.id.insurance1: 
				Intent intentw = new Intent();
				intentw.setClass(AnimInsuranceDetail.this, AnimInsuranceDetailOne.class);
				startActivity(intentw);
				break;
			case R.id.insurance2: 
				Intent intentg = new Intent();
				intentg.setClass(AnimInsuranceDetail.this, AnimInsuranceDetailTwo.class);
				startActivity(intentg);
				break;
		}
	}
	
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO Auto-generated method stub
		if(keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0){
			Intent intent3 = new Intent();
			intent3.setClass(AnimInsuranceDetail.this, FlyOrderInput.class);
			startActivity(intent3);
			return true;
		}
		return super.onKeyDown(keyCode, event);
	} 
	
	public void onResume() {     
		super.onResume();     
		MobclickAgent.onResume(this); 
	}  
	
	public void onPause() {     
		super.onPause();     
		MobclickAgent.onPause(this); 
	}  
}
